package com.note.simpleshop.utils;

import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;

public class ResponseUtil {
  
    public static void write(HttpServletResponse response, String str)throws Exception{
    	response.setCharacterEncoding("UTF-8");
        response.setContentType("application/json; charset=UTF-8");  
        PrintWriter out=response.getWriter();
        out.println(str);  
        out.flush();  
        out.close();  
    }  
}  